import request from "@/utils/request";
// 列表
export function getModelList(query) {
    return request({
        url: "/flowable/definition/getModelList",
        method: "get",
        params: query,
    });
}

// 查询详细
export function getMaintenanceDetails(id) {
    return request({
        url: "/car/carMaintenance/" + id,
        method: "get",
    });
}

// 新增
export function addModel(data) {
    return request({
        url: "/flowable/definition/saveModel",
        method: "post",
        data: data,
    });
}

// 流程部署
export function processDeployment(data) {
    return request({
        url: "/flowable/definition/deploymentModelId",
        method: "post",
        data: data,
    });
}

// 读取xml文件
export function readXml(data) {
    return request({
        url: "/flowable/definition/readXml",
        method: "get",
        params: data,
    });
}

// 流程已经部署列表
export function getProcdefListList(query) {
    return request({
        url: "/flowable/definition/procdefList",
        method: "get",
        params: query,
    });
}

// 流程启停
export function updateState(query) {
    return request({
        url: "flowable/definition/updateState",
        method: "get",
        params: query,
    });
}

// 获取表单列表
export function getFormDate(query) {
    return request({
        url: "/flowable/formCustom/formCustomList",
        method: "get",
        params: query,
    });
}

// 获取抄送用户
export function getCCUser(query) {
    return request({
        url: "/flowable/definition/copyUserList",
        method: "get",
        params: query,
    });
}

// 获取审批角色
export function getApprovalRole(query) {
    return request({
        url: "/flowable/definition/roleList",
        method: "get",
        params: query,
    });
}

// 获取审用户-可拒绝用户
export function getApprovalUser(query) {
    return request({
        url: "/flowable/definition/userList",
        method: "get",
        params: query,
    });
}

export function ApproveList(query) {
    return request({
        url: "/creditReview/approve/allList",
        method: "post",
        data: query,
    });
}

// 获取审批岗位
export function getPostRole(query) {
    return request({
        url: "/flowable/definition/postList",
        method: "get",
        params: query,
    });
}

// 获取出租方列表
export function getLessorList(query,method) {
    return request({
        url: query,
        method: method,
    });
}
